package com.zx.tfw.enums;

import java.util.HashMap;
import java.util.Map;


public enum SkilledEnum {

    // 配色--乱搭
	/*level1		(1, "知道技术", "#E6E6E6"),
	level2		(2, "简单使用", "#FFA773"),
	level3		(3, "熟练使用", "#87EA00"),
	level4		(4, "熟悉原理", "#E93A90"),
	level5		(5, "熟读源码", "#FF3900");*/
    // 配色--微冷色
    level1(1, "知道技术", "#DDDFE3"),
    level2(2, "简单使用", "#DAD5D3"),
    level3(3, "熟练使用", "#A6CDC6"),
    level4(4, "熟悉原理", "#7BBFC8"),
    level5(5, "熟读源码", "#41A8AC");

    private static final Map<Integer, SkilledEnum> map;

    static {
        map = new HashMap<>();
        SkilledEnum[] values = SkilledEnum.values();
        for (SkilledEnum typeEnum : values) {
            map.put(typeEnum.getCode(), typeEnum);
        }
    }

    private int code;
    private String name;
    private String backgroundColor;

    SkilledEnum(int code, String name, String backgroundColor) {
        this.code = code;
        this.name = name;
        this.backgroundColor = backgroundColor;
    }

    public static Map<Integer, SkilledEnum> asMap() {
        return map;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBackgroundColor() {
        return backgroundColor;
    }

    public void setBackgroundColor(String backgroundColor) {
        this.backgroundColor = backgroundColor;
    }
}
